import grails.util.Environment;

class BootStrap {
  def messageSource

  def init = { servletContext ->
    // workaround for i18n issue, taken from http://jira.codehaus.org/browse/GRAILSPLUGINS-1905
    if( grails.util.Environment.getCurrent() == grails.util.Environment.PRODUCTION ){
      messageSource.basenames = [ 'WEB-INF/grails-app/i18n/messages', 'WEB-INF/grails-app/i18n/videoCategory']
      messageSource.clearCache()
    }
  }
  def destroy = {
  }
}
